package com.ahdy.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class AsrResponse {
    private boolean success;
    private String message;
    private String text;
    private Long duration;
    private String sessionId;
    private String sid;

    public static AsrResponse success(String text, Long duration) {
        return new AsrResponse(true, "识别成功", text, duration, null, null);
    }

    public static AsrResponse success(String text, Long duration, String sessionId) {
        return new AsrResponse(true, "识别成功", text, duration, sessionId, null);
    }

    public static AsrResponse success(String text, Long duration, String sessionId, String sid) {
        return new AsrResponse(true, "识别成功", text, duration, sessionId, sid);
    }

    public static AsrResponse error(String message) {
        return new AsrResponse(false, message, null, null, null, null);
    }

    public static AsrResponse error(String message, String sessionId) {
        return new AsrResponse(false, message, null, null, sessionId, null);
    }
} 